package com.arpa.ntocc.common.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

/**
 * <p>
 * 部门信息
 * </p>
 *
 * @author LEO
 * @since 2019-12-09
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("sys_department")
@ApiModel(value="Department对象", description="部门信息")
public class Department extends BasicEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "编码")
    @TableField("code")
    private String code;

    @ApiModelProperty(value = "所属组织机构")
    @TableField("party_group_code")
    private String partyGroupCode;

    @ApiModelProperty(value = "部门编号")
    @TableField("serial_number")
    private String serialNumber;

    @ApiModelProperty(value = "部门名称")
    @TableField("name")
    @Length(max = 100, message = "部门名称长度不能大于100个字符", groups = {Save.class, Update.class})
    private String name;

    @ApiModelProperty(value = "父类编码")
    @TableField("parent_code")
    private String parentCode;

    public interface Save {

    }

    public interface Update {

    }
}
